Probleme with MySQL queries

Probleme with MySQL queries

am 03.09.2008 11:07:46 von David DURIEUX

Hello

There is a problem when I select a line in mysql table and afet I
delete it.


1/ It works :=20
$sql =3D 'SELECT * FROM table WHERE id=3D"10" ';
$req =3D mysql_query($sql) or die('Erreur SQL
!
'.$sql.'
'.mysql_error());=20
while($data =3D mysql_fetch_assoc($req)) {
echo $data['id'];
}
$sql2 =3D 'DELETE FROM table WHERE id=3D"10" ';
$req2 =3D mysql_query($sql2) or die('Erreur SQL
!
'.$sql2.'
'.mysql_error());

2/ It don't work :=20

$sql =3D 'SELECT * FROM table WHERE id=3D"'.$var.'" ';
$req =3D mysql_query($sql) or die('Erreur SQL
!
'.$sql.'
'.mysql_error());=20
while($data =3D mysql_fetch_assoc($req)) {
echo $data['id'];
}
$sql2 =3D 'DELETE FROM table WHERE id=3D"'.$var.'" ';
$req2 =3D mysql_query($sql2) or die('Erreur SQL
!
'.$sql2.'
'.mysql_error());


Results of this queries :=20

In first case (it works) : I see the id get in mysql and it delete it
after

In second case (it don't work) : I don't see id get in mysql. It's like
if it delete it first and after select.

I have not error in php log.


If somebody can help me, because I try since few hours...


Best regards,

David DURIEUX
Tel : +33 (0)4.74.04.81.34
Port : +33 (0)6.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 11:13:11 von Evert Lammerts

> $sql = 'SELECT * FROM table WHERE id="'.$var.'" ';
> $req = mysql_query($sql) or die('Erreur SQL
> !
'.$sql.'
'.mysql_error());
> while($data = mysql_fetch_assoc($req)) {
> echo $data['id'];
> }
> $sql2 = 'DELETE FROM table WHERE id="'.$var.'" ';
> $req2 = mysql_query($sql2) or die('Erreur SQL
> !
'.$sql2.'
'.mysql_error());

I'll ask the obvious: where and how is $var set, and did you echo your
$sql variable to try the query on your mysql server directly?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 11:17:51 von Kendo Tom

Hi ,

For this situation , you should print out the SQL statement to check
the value of the variable "$var" .

--------------------------------------------------
From: "David DURIEUX"
Sent: Wednesday, September 03, 2008 5:07 PM
To:
Subject: [PHP-DB] Probleme with MySQL queries

> Hello
>
> There is a problem when I select a line in mysql table and afet I
> delete it.
>
>
> 1/ It works :
> $sql = 'SELECT * FROM table WHERE id="10" ';
> $req = mysql_query($sql) or die('Erreur SQL
> !
'.$sql.'
'.mysql_error());
> while($data = mysql_fetch_assoc($req)) {
> echo $data['id'];
> }
> $sql2 = 'DELETE FROM table WHERE id="10" ';
> $req2 = mysql_query($sql2) or die('Erreur SQL
> !
'.$sql2.'
'.mysql_error());
>
> 2/ It don't work :
>
> $sql = 'SELECT * FROM table WHERE id="'.$var.'" ';
> $req = mysql_query($sql) or die('Erreur SQL
> !
'.$sql.'
'.mysql_error());
> while($data = mysql_fetch_assoc($req)) {
> echo $data['id'];
> }
> $sql2 = 'DELETE FROM table WHERE id="'.$var.'" ';
> $req2 = mysql_query($sql2) or die('Erreur SQL
> !
'.$sql2.'
'.mysql_error());
>
>
> Results of this queries :
>
> In first case (it works) : I see the id get in mysql and it delete it
> after
>
> In second case (it don't work) : I don't see id get in mysql. It's like
> if it delete it first and after select.
>
> I have not error in php log.
>
>
> If somebody can help me, because I try since few hours...
>
>
> Best regards,
>
> David DURIEUX
> Tel : +33 (0)4.74.04.81.34
> Port : +33 (0)6.34.99.45.18
> Mail : d.durieux@siprossii.com
> Site Web : http://www.siprossii.com/
>
> SIPROSSII
> 847 route de Frans (Créacité)
> 69400 Villefranche sur Saône
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 11:21:22 von David DURIEUX

At the begining $var is $_GET['id'] and after I try directly $var =3D 10
but no changes.

On the server directly, I can only try with the values :=20
$sql =3D 'SELECT * FROM table WHERE id=3D"10" '; and for this no problem.

The problem is when I use a variable in query


Best regards,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 11:13:11 +0200
"Evert Lammerts" a =E9crit:

>> $sql =3D 'SELECT * FROM table WHERE id=3D"'.$var.'" ';
>> $req =3D mysql_query($sql) or die('Erreur SQL
>> !
'.$sql.'
'.mysql_error());
>> while($data =3D mysql_fetch_assoc($req)) {
>> echo $data['id'];
>> }
>> $sql2 =3D 'DELETE FROM table WHERE id=3D"'.$var.'" ';
>> $req2 =3D mysql_query($sql2) or die('Erreur SQL
>> !
'.$sql2.'
'.mysql_error());
>
>I'll ask the obvious: where and how is $var set, and did you echo your
>$sql variable to try the query on your mysql server directly?
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 11:22:43 von David DURIEUX

Bonjour,

I have print and it's OK, the query is good like if I put the value
directly in the query

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 17:17:51 +0800
"Kendo Tom" a =E9crit:

>Hi ,
>
> For this situation , you should print out the SQL statement to
> check=20
>the value of the variable "$var" .
>
>--------------------------------------------------
>From: "David DURIEUX"
>Sent: Wednesday, September 03, 2008 5:07 PM
>To:
>Subject: [PHP-DB] Probleme with MySQL queries
>
>> Hello
>>
>> There is a problem when I select a line in mysql table and afet I
>> delete it.
>>
>>
>> 1/ It works :
>> $sql =3D 'SELECT * FROM table WHERE id=3D"10" ';
>> $req =3D mysql_query($sql) or die('Erreur SQL
>> !
'.$sql.'
'.mysql_error());
>> while($data =3D mysql_fetch_assoc($req)) {
>> echo $data['id'];
>> }
>> $sql2 =3D 'DELETE FROM table WHERE id=3D"10" ';
>> $req2 =3D mysql_query($sql2) or die('Erreur SQL
>> !
'.$sql2.'
'.mysql_error());
>>
>> 2/ It don't work :
>>
>> $sql =3D 'SELECT * FROM table WHERE id=3D"'.$var.'" ';
>> $req =3D mysql_query($sql) or die('Erreur SQL
>> !
'.$sql.'
'.mysql_error());
>> while($data =3D mysql_fetch_assoc($req)) {
>> echo $data['id'];
>> }
>> $sql2 =3D 'DELETE FROM table WHERE id=3D"'.$var.'" ';
>> $req2 =3D mysql_query($sql2) or die('Erreur SQL
>> !
'.$sql2.'
'.mysql_error());
>>
>>
>> Results of this queries :
>>
>> In first case (it works) : I see the id get in mysql and it delete it
>> after
>>
>> In second case (it don't work) : I don't see id get in mysql. It's
>> like if it delete it first and after select.
>>
>> I have not error in php log.
>>
>>
>> If somebody can help me, because I try since few hours...
>>
>>
>> Best regards,
>>
>> David DURIEUX
>> Tel : +33 (0)4.74.04.81.34
>> Port : +33 (0)6.34.99.45.18
>> Mail : d.durieux@siprossii.com
>> Site Web : http://www.siprossii.com/
>>
>> SIPROSSII
>> 847 route de Frans (Cr=E9acit=E9)
>> 69400 Villefranche sur Sa=F4ne
>>
>>
>> --=20
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>=20
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 11:29:29 von Evert Lammerts

RGlkIHlvdSBhY3R1YWxseSBlY2hvIHRoZSAkc3FsPwoKSSBrbm93IGl0IHdv cmtzIHJpZ2h0IG5v
dywgYnV0IHRyeSB0byB0YWtlIGF3YXk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d3d3LnBocC5uZXQvdW5zdWIucGhwCj4KPgo=

Re: Probleme with MySQL queries

am 03.09.2008 11:35:33 von David DURIEUX

Bonjour,

No changes :/=20
I have always the same things

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 11:29:29 +0200
"Evert Lammerts" a =E9crit:

>Did you actually echo the $sql?
>
>I know it works right now, but try to take away the quotes around the
>value in the query and see if something happens:
>
>$sql =3D "SELECT * FROM table WHERE id=3D{$var}";
>
>If that doesn't work then var_dump($sql, $var) and write us the
>result. Also let us know the data type of the ID column.
>
>On Wed, Sep 3, 2008 at 11:21 AM, David DURIEUX
> wrote:
>> At the begining $var is $_GET['id'] and after I try directly $var =3D
>> 10 but no changes.
>>
>> On the server directly, I can only try with the values :
>> $sql =3D 'SELECT * FROM table WHERE id=3D"10" '; and for this no problem.
>>
>> The problem is when I use a variable in query
>>
>>
>> Best regards,
>>
>> David DURIEUX
>> Tel : 04.74.04.81.34
>> Port : 06.34.99.45.18
>> Mail : d.durieux@siprossii.com
>> Site Web : http://www.siprossii.com/
>>
>> SIPROSSII
>> 847 route de Frans (Cr=E9acit=E9)
>> 69400 Villefranche sur Sa=F4ne
>>
>>
>>
>> Le Wed, 3 Sep 2008 11:13:11 +0200
>> "Evert Lammerts" a =E9crit:
>>
>>>> $sql =3D 'SELECT * FROM table WHERE id=3D"'.$var.'" ';
>>>> $req =3D mysql_query($sql) or die('Erreur SQL
>>>> !
'.$sql.'
'.mysql_error());
>>>> while($data =3D mysql_fetch_assoc($req)) {
>>>> echo $data['id'];
>>>> }
>>>> $sql2 =3D 'DELETE FROM table WHERE id=3D"'.$var.'" ';
>>>> $req2 =3D mysql_query($sql2) or die('Erreur SQL
>>>> !
'.$sql2.'
'.mysql_error());
>>>
>>>I'll ask the obvious: where and how is $var set, and did you echo
>>>your $sql variable to try the query on your mysql server directly?
>>>
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 11:37:37 von Evert Lammerts

>>If that doesn't work then var_dump($sql, $var) and write us the
>>result. Also let us know the data type of the ID column.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 11:45:25 von David DURIEUX

Bonjour,


string(40) "SELECT * FROM table WHERE id=3D107 "=20
string(3) "107"
string(38) "DELETE FROM table WHERE id=3D107 "=20
string(3) "107"=20



Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 11:37:37 +0200
"Evert Lammerts" a =E9crit:

>>>If that doesn't work then var_dump($sql, $var) and write us the
>>>result. Also let us know the data type of the ID column.
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 11:58:07 von Micah Gersten

What does mysql_error return?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



David DURIEUX wrote:
> Bonjour,
>
>
> string(40) "SELECT * FROM table WHERE id=107 "
> string(3) "107"
> string(38) "DELETE FROM table WHERE id=107 "
> string(3) "107"
>
>
>
> Cordialement,
>
> David DURIEUX
> Tel : 04.74.04.81.34
> Port : 06.34.99.45.18
> Mail : d.durieux@siprossii.com
> Site Web : http://www.siprossii.com/
>
> SIPROSSII
> 847 route de Frans (Créacité)
> 69400 Villefranche sur Saône
>
>
>
> Le Wed, 3 Sep 2008 11:37:37 +0200
> "Evert Lammerts" a écrit:
>
>
>>>> If that doesn't work then var_dump($sql, $var) and write us the
>>>> result. Also let us know the data type of the ID column.
>>>>
>
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 12:02:00 von Evert Lammerts

> string(40) "SELECT * FROM table WHERE id=107 "
> string(3) "107"

And this query works when you run it on the database directly? Id 107 exists?

Assuming that that's both so we're running out of options.

After the select, can you do a print of mysql_error() and of mysql_num_rows()?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 12:02:16 von David DURIEUX

Bonjour,

No error for mysql_error for all 2 queries.

In fact the first return 0 results

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 03 Sep 2008 04:58:07 -0500
Micah Gersten a =E9crit:

>What does mysql_error return?
>
>Thank you,
>Micah Gersten
>onShore Networks
>Internal Developer
>http://www.onshore.com
>
>
>
>David DURIEUX wrote:
>> Bonjour,
>>
>>
>> string(40) "SELECT * FROM table WHERE id=3D107 "=20
>> string(3) "107"
>> string(38) "DELETE FROM table WHERE id=3D107 "=20
>> string(3) "107"=20
>>
>>
>>
>> Cordialement,
>>
>> David DURIEUX
>> Tel : 04.74.04.81.34
>> Port : 06.34.99.45.18
>> Mail : d.durieux@siprossii.com
>> Site Web : http://www.siprossii.com/
>>
>> SIPROSSII
>> 847 route de Frans (Cr=E9acit=E9)
>> 69400 Villefranche sur Sa=F4ne
>>
>>
>>
>> Le Wed, 3 Sep 2008 11:37:37 +0200
>> "Evert Lammerts" a =E9crit:
>>
>> =20
>>>>> If that doesn't work then var_dump($sql, $var) and write us the
>>>>> result. Also let us know the data type of the ID column.
>>>>> =20
>>
>>
>> =20
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 12:11:00 von Evert Lammerts

> In fact the first return 0 results

So the problem is in your select, and if your select works when you
manually insert the value for id (iow, without using $var), the
problem has something to do with $var.

Is the data type of the ID column INT? Try the following and let us
know the output:

$var=107;
$query = mysql_query("SELECT * FROM table WHERE id={$var};") or
die(mysql_error()); // make sure to use double quotes
var_dump(mysql_error(), mysql_num_rows());

$var=mysql_real_escape_string("107");
$query = mysql_query("SELECT * FROM table WHERE id={$var};") or
die(mysql_error()); // make sure to use double quotes
var_dump(mysql_error(), mysql_num_rows());

$query = mysql_query("SELECT * FROM table WHERE id=107;") or
die(mysql_error()); // make sure to use double quotes
var_dump(mysql_error(), mysql_num_rows());

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 12:21:00 von David DURIEUX

Bonjour,



Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne

ID is INT. It's ok before.

I have errors :=20


Warning: Wrong parameter count for mysql_num_rows()
in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma ines.php
on line 7 string(0) "" NULL

Warning: Wrong parameter count for mysql_num_rows()
in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma ines.php
on line 12 string(0) "" NULL

Warning: Wrong parameter count for mysql_num_rows()
in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma ines.php
on line 16 string(0) "" NULL=20



Le Wed, 3 Sep 2008 12:11:00 +0200
"Evert Lammerts" a =E9crit:

>> In fact the first return 0 results
>
>So the problem is in your select, and if your select works when you
>manually insert the value for id (iow, without using $var), the
>problem has something to do with $var.
>
>Is the data type of the ID column INT? Try the following and let us
>know the output:
>
>$var=3D107;
>$query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};") or
>die(mysql_error()); // make sure to use double quotes
>var_dump(mysql_error(), mysql_num_rows());
>
>$var=3Dmysql_real_escape_string("107");
>$query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};") or
>die(mysql_error()); // make sure to use double quotes
>var_dump(mysql_error(), mysql_num_rows());
>
>$query =3D mysql_query("SELECT * FROM table WHERE id=3D107;") or
>die(mysql_error()); // make sure to use double quotes
>var_dump(mysql_error(), mysql_num_rows());
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 12:23:19 von Micah Gersten

You have to pass mysql_num_rows a $result variable from your query.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



David DURIEUX wrote:
> Bonjour,
>
>
>
> Cordialement,
>
> David DURIEUX
> Tel : 04.74.04.81.34
> Port : 06.34.99.45.18
> Mail : d.durieux@siprossii.com
> Site Web : http://www.siprossii.com/
>
> SIPROSSII
> 847 route de Frans (Créacité)
> 69400 Villefranche sur Saône
>
> ID is INT. It's ok before.
>
> I have errors :
>
>
> Warning: Wrong parameter count for mysql_num_rows()
> in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma ines.php
> on line 7 string(0) "" NULL
>
> Warning: Wrong parameter count for mysql_num_rows()
> in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma ines.php
> on line 12 string(0) "" NULL
>
> Warning: Wrong parameter count for mysql_num_rows()
> in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma ines.php
> on line 16 string(0) "" NULL
>
>
>
> Le Wed, 3 Sep 2008 12:11:00 +0200
> "Evert Lammerts" a écrit:
>
>
>>> In fact the first return 0 results
>>>
>> So the problem is in your select, and if your select works when you
>> manually insert the value for id (iow, without using $var), the
>> problem has something to do with $var.
>>
>> Is the data type of the ID column INT? Try the following and let us
>> know the output:
>>
>> $var=107;
>> $query = mysql_query("SELECT * FROM table WHERE id={$var};") or
>> die(mysql_error()); // make sure to use double quotes
>> var_dump(mysql_error(), mysql_num_rows());
>>
>> $var=mysql_real_escape_string("107");
>> $query = mysql_query("SELECT * FROM table WHERE id={$var};") or
>> die(mysql_error()); // make sure to use double quotes
>> var_dump(mysql_error(), mysql_num_rows());
>>
>> $query = mysql_query("SELECT * FROM table WHERE id=107;") or
>> die(mysql_error()); // make sure to use double quotes
>> var_dump(mysql_error(), mysql_num_rows());
>>
>>
>
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 12:24:27 von Evert Lammerts

TXkgYmFkLCBpdCBzaG91bGQgaGF2ZSB0aGUgcXVlcnkgaGFuZGxlIGFzIGEg cGFyYW1ldGVyIG9m
IGNvdXJzZToKCiR2YXI9MTA3OwokcXVlcnkgPSBteXNxbF9xdWVyeSgiU0VM RUNUICogRlJPTSB0
YWJsZSBXSEVSRSBpZD17JHZhcn07Iikgb3IKZGllKG15c3FsX2Vycm9yKCkp OyAvLyBtYWtlIHN1
cmUgdG8gdXNlIGRvdWJsZSBxdW90ZXMKdmFyX2R1bXAobXlzcWxfZXJyb3Io KSwgbXlzcWxfbnVt
X3Jvd3MoJHF1ZXJ5KSk7CgokdmFyPW15c3FsX3JlYWxfZXNjYXBlX3N0cmlu ZygiMTA3Iik7CiRx
dWVyeSA9IG15c3FsX3F1ZXJ5KCJTRUxFQ1QgKiBGUk9NIHRhYmxlIFdIRVJF IGlkPXskdmFyfTsi
KSBvcgpkaWUobXlzcWxfZXJyb3IoKSk7IC8vIG1ha2Ugc3VyZSB0byB1c2Ug ZG91YmxlIHF1b3Rl
cwp2YXJfZHVtcChteXNxbF9lcnJvcigpLCBteXNxbF9udW1fcm93cygkcXVl cnkpKTsKCiRxdWVy
eSA9IG15c3FsX3F1ZXJ5KCJTRUxFQ1QgKiBGUk9NIHRhYmxlIFdIRVJFIGlk PTEwNzsiKSBv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zcWxfbnVtX3Jvd3MoKSk7Cj4+Cj4+JHZhcj1teXNxbF9yZWFsX2Vz Y2FwZV9zdHJpbmco
IjEwNyIpOwo+PiRxdWVyeSA9IG15c3FsX3F1ZXJ5KCJTRUxFQ1QgKiBGUk9N IHRhYmxlIFdIRVJF
IGlkPXskdmFyfTsiKSBvcgo+PmRpZShteXNxbF9lcnJvcigpKTsgLy8gbWFr ZSBzdXJlIHRvIHVz
ZSBkb3VibGUgcXVvdGVzCj4+dmFyX2R1bXAobXlzcWxfZXJyb3IoKSwgbXlz cWxfbnVtX3Jvd3Mo
KSk7Cj4+Cj4+JHF1ZXJ5ID0gbXlzcWxfcXVlcnkoIlNFTEVDVCAqIEZST00g dGFibGUgV0hFUkUg
aWQ9MTA3OyIpIG9yCj4+ZGllKG15c3FsX2Vycm9yKCkpOyAvLyBtYWtlIHN1 cmUgdG8gdXNlIGRv
dWJsZSBxdW90ZXMKPj52YXJfZHVtcChteXNxbF9lcnJvcigpLCBteXNxbF9u dW1fcm93cygpKTsK
Pj4KPgo+Cj4gLS0KPiBQSFAgRGF0YWJhc2UgTWFpbGluZyBMaXN0IChodHRw Oi8vd3d3LnBocC5u
ZXQvKQo+IFRvIHVuc3Vic2NyaWJlLCB2aXNpdDogaHR0cDovL3d3dy5waHAu bmV0L3Vuc3ViLnBo
cAo+Cj4K

Re: Probleme with MySQL queries

am 03.09.2008 12:25:34 von David DURIEUX

Bonjour,

string(0) "" int(1)
string(0) "" int(1)
string(0) "" int(1)=20

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 03 Sep 2008 05:23:19 -0500
Micah Gersten a =E9crit:

>You have to pass mysql_num_rows a $result variable from your query.
>
>Thank you,
>Micah Gersten
>onShore Networks
>Internal Developer
>http://www.onshore.com
>
>
>
>David DURIEUX wrote:
>> Bonjour,
>>
>>
>>
>> Cordialement,
>>
>> David DURIEUX
>> Tel : 04.74.04.81.34
>> Port : 06.34.99.45.18
>> Mail : d.durieux@siprossii.com
>> Site Web : http://www.siprossii.com/
>>
>> SIPROSSII
>> 847 route de Frans (Cr=E9acit=E9)
>> 69400 Villefranche sur Sa=F4ne
>>
>> ID is INT. It's ok before.
>>
>> I have errors :=20
>>
>>
>> Warning: Wrong parameter count for mysql_num_rows()
>> in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma ines.php
>> on line 7 string(0) "" NULL
>>
>> Warning: Wrong parameter count for mysql_num_rows()
>> in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma ines.php
>> on line 12 string(0) "" NULL
>>
>> Warning: Wrong parameter count for mysql_num_rows()
>> in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma ines.php
>> on line 16 string(0) "" NULL=20
>>
>>
>>
>> Le Wed, 3 Sep 2008 12:11:00 +0200
>> "Evert Lammerts" a =E9crit:
>>
>> =20
>>>> In fact the first return 0 results
>>>> =20
>>> So the problem is in your select, and if your select works when you
>>> manually insert the value for id (iow, without using $var), the
>>> problem has something to do with $var.
>>>
>>> Is the data type of the ID column INT? Try the following and let us
>>> know the output:
>>>
>>> $var=3D107;
>>> $query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};") or
>>> die(mysql_error()); // make sure to use double quotes
>>> var_dump(mysql_error(), mysql_num_rows());
>>>
>>> $var=3Dmysql_real_escape_string("107");
>>> $query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};") or
>>> die(mysql_error()); // make sure to use double quotes
>>> var_dump(mysql_error(), mysql_num_rows());
>>>
>>> $query =3D mysql_query("SELECT * FROM table WHERE id=3D107;") or
>>> die(mysql_error()); // make sure to use double quotes
>>> var_dump(mysql_error(), mysql_num_rows());
>>>
>>> =20
>>
>>
>> =20
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme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1YnNjcmliZSwgdmlzaXQ6IGh0dHA6Ly93d3cucGhwLm5ldC91 bnN1Yi5waHAKPj4+
Pj4+Pgo+Pj4+Pj4+Cj4+Pj4+Cj4+Pj4+Cj4+Pgo+Pj4KPgo+Cg==

Re: Probleme with MySQL queries

am 03.09.2008 12:57:17 von David DURIEUX

Bonjour,

array(2) { ["module"]=3D> string(12) "sousdomaines" ["deleteid"]=3D>
string(3) "133" }


Note : The ID is good deleted but no select return

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 12:54:19 +0200
"Evert Lammerts" a =E9crit:

>What does var_dump($_GET) say?
>
>On Wed, Sep 3, 2008 at 12:48 PM, David DURIEUX
> wrote:
>> Bonjour,
>>
>> The query works
>>
>> But when I wrote this :
>>
>>
>> if (isset($_GET['deleteid'])){
>>
>> $var=3D108;
>> $query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};")
>> or die("select error: " . mysql_error());
>>
>> if ($row =3D mysql_fetch_assoc($query))
>> var_dump ($row);
>>
>> $query =3D mysql_query("DELETE FROM table WHERE id=3D{$var}") or
>> die("delete error: " . mysql_error());
>>
>>
>> }
>>
>>
>> It not works and no return and no error .
>>
>> If I place the query you have sent me without the if it works but I
>> must have a if for delete the ID
>>
>> It is very strange
>>
>> Cordialement,
>>
>> David DURIEUX
>> Tel : 04.74.04.81.34
>> Port : 06.34.99.45.18
>> Mail : d.durieux@siprossii.com
>> Site Web : http://www.siprossii.com/
>>
>> SIPROSSII
>> 847 route de Frans (Cr=E9acit=E9)
>> 69400 Villefranche sur Sa=F4ne
>>
>>
>>
>> Le Wed, 3 Sep 2008 12:39:45 +0200
>> "Evert Lammerts" a =E9crit:
>>
>>>Fixed then?
>>>
>>>On Wed, Sep 3, 2008 at 12:39 PM, David DURIEUX
>>> wrote:
>>>> Bonjour,
>>>>
>>>> Yes I have the values
>>>>
>>>> array(5) { ["id"]=3D> string(3) "121" ["domaine"]=3D> string(1)
>>>> "1" ["sous_domaine"]=3D> string(8) "aaaaaaaa" ["repertoire"]=3D>
>>>> string(0) "" ["redirection"]=3D> string(1) "0" }
>>>>
>>>>
>>>> Cordialement,
>>>>
>>>> David DURIEUX
>>>> Tel : 04.74.04.81.34
>>>> Port : 06.34.99.45.18
>>>> Mail : d.durieux@siprossii.com
>>>> Site Web : http://www.siprossii.com/
>>>>
>>>> SIPROSSII
>>>> 847 route de Frans (Cr=E9acit=E9)
>>>> 69400 Villefranche sur Sa=F4ne
>>>>
>>>>
>>>>
>>>> Le Wed, 3 Sep 2008 12:36:43 +0200
>>>> "Evert Lammerts" a =E9crit:
>>>>
>>>>>I keep on making mistakes. $data should be $row in the var_dump -
>>>>>but right now your DELETE has already deleted id 17 (the fact that
>>>>>it prints NULL means the if condition was satisfied). So replace
>>>>>the below code with a different $var value:
>>>>>
>>>>>$var=3D107;
>>>>>$query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};") or
>>>>>die("select error: " . mysql_error());
>>>>>
>>>>>if ($row =3D mysql_fetch_assoc($query))
>>>>> var_dump ($row);
>>>>>
>>>>>$query =3D mysql_query("DELETE FROM table WHERE id=3D{$var}") or
>>>>>die("delete error: " . mysql_error());
>>>>>
>>>>>On Wed, Sep 3, 2008 at 12:33 PM, David DURIEUX
>>>>> wrote:
>>>>>> Bonjour,
>>>>>>
>>>>>> I have :
>>>>>>
>>>>>> NULL
>>>>>>
>>>>>>
>>>>>>
>>>>>> Cordialement,
>>>>>>
>>>>>> David DURIEUX
>>>>>> Tel : 04.74.04.81.34
>>>>>> Port : 06.34.99.45.18
>>>>>> Mail : d.durieux@siprossii.com
>>>>>> Site Web : http://www.siprossii.com/
>>>>>>
>>>>>> SIPROSSII
>>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>>
>>>>>>
>>>>>>
>>>>>> Le Wed, 3 Sep 2008 12:29:44 +0200
>>>>>> "Evert Lammerts" a =E9crit:
>>>>>>
>>>>>>>Which means you do get results and your select works.
>>>>>>>
>>>>>>>Now try:
>>>>>>>
>>>>>>>$var=3D107;
>>>>>>>$query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};") or
>>>>>>>die(mysql_error());
>>>>>>>
>>>>>>>if ($row =3D mysql_fetch_assoc($query))
>>>>>>> var_dump ($data);
>>>>>>>
>>>>>>>$query =3D mysql_query("DELETE FROM table WHERE id=3D{$var}") or
>>>>>>>die(mysql_error());
>>>>>>>
>>>>>>>On Wed, Sep 3, 2008 at 12:25 PM, David DURIEUX
>>>>>>> wrote:
>>>>>>>> Bonjour,
>>>>>>>>
>>>>>>>> string(0) "" int(1)
>>>>>>>> string(0) "" int(1)
>>>>>>>> string(0) "" int(1)
>>>>>>>>
>>>>>>>> Cordialement,
>>>>>>>>
>>>>>>>> David DURIEUX
>>>>>>>> Tel : 04.74.04.81.34
>>>>>>>> Port : 06.34.99.45.18
>>>>>>>> Mail : d.durieux@siprossii.com
>>>>>>>> Site Web : http://www.siprossii.com/
>>>>>>>>
>>>>>>>> SIPROSSII
>>>>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Le Wed, 03 Sep 2008 05:23:19 -0500
>>>>>>>> Micah Gersten a =E9crit:
>>>>>>>>
>>>>>>>>>You have to pass mysql_num_rows a $result variable from your
>>>>>>>>>query.
>>>>>>>>>
>>>>>>>>>Thank you,
>>>>>>>>>Micah Gersten
>>>>>>>>>onShore Networks
>>>>>>>>>Internal Developer
>>>>>>>>>http://www.onshore.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>David DURIEUX wrote:
>>>>>>>>>> Bonjour,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Cordialement,
>>>>>>>>>>
>>>>>>>>>> David DURIEUX
>>>>>>>>>> Tel : 04.74.04.81.34
>>>>>>>>>> Port : 06.34.99.45.18
>>>>>>>>>> Mail : d.durieux@siprossii.com
>>>>>>>>>> Site Web : http://www.siprossii.com/
>>>>>>>>>>
>>>>>>>>>> SIPROSSII
>>>>>>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>>>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>>>>>>
>>>>>>>>>> ID is INT. It's ok before.
>>>>>>>>>>
>>>>>>>>>> I have errors :
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Warning: Wrong parameter count for mysql_num_rows()
>>>>>>>>>> in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma i=
nes.php
>>>>>>>>>> on line 7 string(0) "" NULL
>>>>>>>>>>
>>>>>>>>>> Warning: Wrong parameter count for mysql_num_rows()
>>>>>>>>>> in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma i=
nes.php
>>>>>>>>>> on line 12 string(0) "" NULL
>>>>>>>>>>
>>>>>>>>>> Warning: Wrong parameter count for mysql_num_rows()
>>>>>>>>>> in /usr/home/sites/CL000001/Web_data/hebergement/pages/sousdoma i=
nes.php
>>>>>>>>>> on line 16 string(0) "" NULL
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Le Wed, 3 Sep 2008 12:11:00 +0200
>>>>>>>>>> "Evert Lammerts" a =E9crit:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>> In fact the first return 0 results
>>>>>>>>>>>>
>>>>>>>>>>> So the problem is in your select, and if your select works
>>>>>>>>>>> when you manually insert the value for id (iow, without
>>>>>>>>>>> using $var), the problem has something to do with $var.
>>>>>>>>>>>
>>>>>>>>>>> Is the data type of the ID column INT? Try the following and
>>>>>>>>>>> let us know the output:
>>>>>>>>>>>
>>>>>>>>>>> $var=3D107;
>>>>>>>>>>> $query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};")
>>>>>>>>>>> or die(mysql_error()); // make sure to use double quotes
>>>>>>>>>>> var_dump(mysql_error(), mysql_num_rows());
>>>>>>>>>>>
>>>>>>>>>>> $var=3Dmysql_real_escape_string("107");
>>>>>>>>>>> $query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};")
>>>>>>>>>>> or die(mysql_error()); // make sure to use double quotes
>>>>>>>>>>> var_dump(mysql_error(), mysql_num_rows());
>>>>>>>>>>>
>>>>>>>>>>> $query =3D mysql_query("SELECT * FROM table WHERE id=3D107;") or
>>>>>>>>>>> die(mysql_error()); // make sure to use double quotes
>>>>>>>>>>> var_dump(mysql_error(), mysql_num_rows());
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> PHP Database Mailing List (http://www.php.net/)
>>>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 13:01:44 von Evert Lammerts

RGlkIHlvdSBjaGFuZ2UgJHZhcj0xMDg7IGludG8KJHZhcj1teXNxbF9yZWFs X2VzY2FwZV9zdHJp
bmcoJF9HRVRbJ2RlbGV0ZWlkJ10pPyA6CgppZiAoaXNzZXQoJF9HRVRbJ2Rl bGV0ZWlkJ10pKXsK
ICAgICAgICAkdmFyPW15c3FsX3JlYWxfZXNjYXBlX3N0cmluZygkX0dFVFsn ZGVsZXRlaWQnXSk7
CiAgICAgICAgJHF1ZXJ5ID0gbXlzcWxfcXVlcnkoIlNFTEVDVCAqIEZST00g dGFibGUgV0hFUkUg
aWQ9eyR2YXJ9OyIpIG9yCiAgICAgICAgZGllKCJzZWxlY3QgZXJyb3I6ICIg LiBteXNxbF9lcnJv
cigpKT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waHAubmV0L3Vuc3ViLnBocAo+Cj4K

Re: Probleme with MySQL queries

am 03.09.2008 13:19:52 von Evert Lammerts

> I have :
>
> array(2) { ["module"]=> string(12) "sousdomaines" ["deleteid"]=>
> string(3) "134" }
>
> But the ID is not deleted in mysql.

That seems to be your var_dump($_GET), which means that either if
(isset($_GET['deleteid'])) evaluates to FALSE or your SELECT does not
return results. Let's check:

if (strlen($_GET["deleteid"])) {
var_dump($_GET["deleteid"]);
$var = mysql_real_escape_string($_GET["deleteid"]);
$query = mysql_query("SELECT * FROM table WHERE id={$var};")
or die("select error: " . mysql_error());
var_dump(mysql_num_rows($query));
if ($row = mysql_fetch_assoc($query)) {
var_dump ($row);
mysql_query("DELETE FROM table WHERE id={$row['id']}") or
die("delete error: " . mysql_error());
}
}

> In must be away for 2 or 3 hours, I return after to continue this.
French lunch I'm guessing :-) I'm jealous! You guys know how to do
that, with your perfect cheese and sausage! I'll be away myself from
half past 2.

Try to keep your replies on the list - it's useful for others.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 14:12:01 von David DURIEUX

Bonjour,

I Have now :=20


string(3) "134" int(0)



Lunch... NOT, I haven't the time today :p but cheese and sausage is
good :)

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 13:19:52 +0200
"Evert Lammerts" a =E9crit:

>> I have :
>>
>> array(2) { ["module"]=3D> string(12) "sousdomaines" ["deleteid"]=3D>
>> string(3) "134" }
>>
>> But the ID is not deleted in mysql.
>
>That seems to be your var_dump($_GET), which means that either if
>(isset($_GET['deleteid'])) evaluates to FALSE or your SELECT does not
>return results. Let's check:
>
>if (strlen($_GET["deleteid"])) {
> var_dump($_GET["deleteid"]);
> $var =3D mysql_real_escape_string($_GET["deleteid"]);
> $query =3D mysql_query("SELECT * FROM table WHERE id=3D{$var};")
>or die("select error: " . mysql_error());
> var_dump(mysql_num_rows($query));
> if ($row =3D mysql_fetch_assoc($query)) {
> var_dump ($row);
> mysql_query("DELETE FROM table WHERE id=3D{$row['id']}") or
>die("delete error: " . mysql_error());
> }
>}
>
>> In must be away for 2 or 3 hours, I return after to continue this.
>French lunch I'm guessing :-) I'm jealous! You guys know how to do
>that, with your perfect cheese and sausage! I'll be away myself from
>half past 2.
>
>Try to keep your replies on the list - it's useful for others.
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 14:17:59 von Evert Lammerts

> string(3) "134" int(0)

This means you're trying to delete the entry with id=3, and that it
cannot find that in the database. Are you sure it exists? We tried the
queries separately and the SELECT had no problem... SELECT * FROM
table WHERE id=3;

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 14:20:14 von David DURIEUX

Bonjour,

Are you sur it is 3 ? it is 134 no?

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 14:17:59 +0200
"Evert Lammerts" a =E9crit:

>> string(3) "134" int(0)
>
>This means you're trying to delete the entry with id=3D3, and that it
>cannot find that in the database. Are you sure it exists? We tried the
>queries separately and the SELECT had no problem... SELECT * FROM
>table WHERE id=3D3;
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 14:21:47 von David DURIEUX

Bonjour,

Humm with this query I have forgotten to tell you the ID is DELETED=20

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 14:17:59 +0200
"Evert Lammerts" a =E9crit:

>> string(3) "134" int(0)
>
>This means you're trying to delete the entry with id=3D3, and that it
>cannot find that in the database. Are you sure it exists? We tried the
>queries separately and the SELECT had no problem... SELECT * FROM
>table WHERE id=3D3;
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 14:24:23 von Evert Lammerts

> Humm with this query I have forgotten to tell you the ID is DELETED

You mean the record with id=134?

> Are you sur it is 3 ? it is 134 no?

You're right :-)

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 14:26:27 von David DURIEUX

Bonjour,

Yes record exist before the query and is deleted after

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 14:24:23 +0200
"Evert Lammerts" a =E9crit:

>> Humm with this query I have forgotten to tell you the ID is DELETED
>
>You mean the record with id=3D134?
>
>> Are you sur it is 3 ? it is 134 no?
>
>You're right :-)
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 19:41:27 von Dee Ayy

When using mysql_query, the SQL string to be executed should not end
in a semicolon. Your initial post did not have a semicolon (but you
obviously edited it to make it generic). Perhaps this was the initial
problem? Subsequent posts had you terminating your queries with a
semicolon.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 19:58:06 von Evert Lammerts

On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy wrote:
> When using mysql_query, the SQL string to be executed should not end
> in a semicolon.

Ending a query with a semicolon should not be a problem - the string
is parsed by the mysql server, which handles it fine.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 20:05:22 von Evert Lammerts

On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts wrote:
> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy wrote:
>> When using mysql_query, the SQL string to be executed should not end
>> in a semicolon.
>
> Ending a query with a semicolon should not be a problem - the string
> is parsed by the mysql server, which handles it fine.

The manual does mention it, I'm a little too quick with my replies. I
personally never had a problem with it though. Plus, it seemed to work
some mails ago.

David, did I understand well that your problem is solved?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 20:29:03 von David DURIEUX

Bonjour,

No, I must test a little more, I tell in few minutes....

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 20:05:22 +0200
"Evert Lammerts" a =E9crit:

>On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts
> wrote:
>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy wrote:
>>> When using mysql_query, the SQL string to be executed should not end
>>> in a semicolon.
>>
>> Ending a query with a semicolon should not be a problem - the string
>> is parsed by the mysql server, which handles it fine.
>
>The manual does mention it, I'm a little too quick with my replies. I
>personally never had a problem with it though. Plus, it seemed to work
>some mails ago.
>
>David, did I understand well that your problem is solved?
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 20:29:32 von Dee Ayy

On Wed, Sep 3, 2008 at 1:05 PM, Evert Lammerts wrote:
> On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts wrote:
>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy wrote:
>>> When using mysql_query, the SQL string to be executed should not end
>>> in a semicolon.
>>
>> Ending a query with a semicolon should not be a problem - the string
>> is parsed by the mysql server, which handles it fine.
>
> The manual does mention it, I'm a little too quick with my replies. I
> personally never had a problem with it though. Plus, it seemed to work
> some mails ago.
>
> David, did I understand well that your problem is solved?
>

I have run into problems with it, and it is in the manual. But a test
case today did not display the problem on PHP version 4.1.2 and
version 5.1.6.

As I understood, this is/was a security feature so that SQL injection
could not terminate the real query, and add additional hacker queries
to the real query.

Now I'd like to know why it _IS_ executing _WITH_ a semicolon
_DESPITE_ what the manual says. Perhaps some
easily_forgettable_magic_flag.ini setting? Gotta love PHP for that.
Can we really rely completely on mysql_real_escape_string?

When David said the SELECT did not work, but the DELETE worked, I
thought for sure the semicolon was the problem. Also, that maybe he
just removed the SELECT part so he could move on.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 20:35:03 von David DURIEUX

Bonjour,

I have always the problem, select =3D 0 rows and it delete it like if
delete is before the select :/

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 20:05:22 +0200
"Evert Lammerts" a =E9crit:

>On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts
> wrote:
>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy wrote:
>>> When using mysql_query, the SQL string to be executed should not end
>>> in a semicolon.
>>
>> Ending a query with a semicolon should not be a problem - the string
>> is parsed by the mysql server, which handles it fine.
>
>The manual does mention it, I'm a little too quick with my replies. I
>personally never had a problem with it though. Plus, it seemed to work
>some mails ago.
>
>David, did I understand well that your problem is solved?
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 20:43:25 von Evert Lammerts

QXJlIHlvdSBzdGlsbCB1c2luZyB0aGUgY29kZSB3ZSB0YWxrZWQgYWJvdXQ/ CgppZiAoJHJvdyA9
IG15c3FsX2ZldGNoX2Fzc29jKCRxdWVyeSkpIHsKICAgICAgICAgICB2YXJf ZHVtcCAoJHJvdyk7
CiAgICAgICAgICAgbXlzcWxfcXVlcnkoIkRFTEVURSBGUk9NIHRhYmxlIFdI RVJFIGlkPXskcm93
WydpZCddfSIpIG9yCmRpZSgiZGVsZXRlIGVycm9yOiAiIC4gbXlzcWxfZXJy b3IoKSk7Cn0KCmlm
IHNvLCBhcHBhcmVudGx5IGl0IGRvZXMgZmV0Y2ggYSByb3cuIE90aGVyd2lz ZSwgY2FuIHlvdSBz
ZW5kIHRoZQpjb2RlIHlvdSdyZSB1c2luZz8KCk9uIFdlZCwgU2VwIDMsIDIw MDggYXQgODozNSBQ
TSwgRGF2aWQgRFVSSUVVWCA8ZC5kdXJpZXV4QHNpcHJvc3NpaS5jb20+IHdy b3RlOgo+IEJvbmpv
dXIsCj4KPiBJIGhhdmUgYWx3YXlzIHRoZSBwcm9ibGVtLCBzZWxlY3QgPSAw IHJvd3MgYW5kIGl0
IGRlbGV0ZSBpdCBsaWtlIGlmCj4gZGVsZXRlIGlzIGJlZm9yZSB0aGUgc2Vs ZWN0IDovCj4KPiBD
b3JkaWFsZW1lbnQsCj4KPiBEYXZpZCBEVVJJRVVYCj4gVGVsIDogMDQuNzQu MDQuODEuMzQKPiBQ
b3J0IDogMDYuMzQuOTkuNDUuMTgKPiBNYWlsIDogZC5kdXJpZXV4QHNpcHJv c3NpaS5jb20KPiBT
aXRlIFdlYiA6IGh0dHA6Ly93d3cuc2lwcm9zc2lpLmNvbS8KPgo+IFNJUFJP U1NJSQo+IDg0Ny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ibGVtIGlzIHNvbHZlZD8KPj4KPgo+Cj4gLS0K PiBQSFAgRGF0YWJh
c2UgTWFpbGluZyBMaXN0IChodHRwOi8vd3d3LnBocC5uZXQvKQo+IFRvIHVu c3Vic2NyaWJlLCB2
aXNpdDogaHR0cDovL3d3dy5waHAubmV0L3Vuc3ViLnBocAo+Cj4K

Re: Probleme with MySQL queries

am 03.09.2008 20:47:02 von Dee Ayy

> On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX wrote:
>> Bonjour,
>>
>> I have always the problem, select = 0 rows and it delete it like if
>> delete is before the select :/
>>
>> Cordialement,
>>
>> David DURIEUX

Your SELECT has a terminating semicolon. Your DELETE does not. Some
configurations of PHP do not execute from the mysql_query function if
the query is terminated with a semicolon.

What version of PHP are you using?
I wish I knew what flags to also ask about that affect the semicolon.
If in fact your problem is the semicolon.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 20:49:11 von David DURIEUX

Bonjour,

Yes I'm using this query.... and no row select

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 20:43:25 +0200
"Evert Lammerts" a =E9crit:

>Are you still using the code we talked about?
>
>if ($row =3D mysql_fetch_assoc($query)) {
> var_dump ($row);
> mysql_query("DELETE FROM table WHERE id=3D{$row['id']}") or
>die("delete error: " . mysql_error());
>}
>
>if so, apparently it does fetch a row. Otherwise, can you send the
>code you're using?
>
>On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX
> wrote:
>> Bonjour,
>>
>> I have always the problem, select =3D 0 rows and it delete it like if
>> delete is before the select :/
>>
>> Cordialement,
>>
>> David DURIEUX
>> Tel : 04.74.04.81.34
>> Port : 06.34.99.45.18
>> Mail : d.durieux@siprossii.com
>> Site Web : http://www.siprossii.com/
>>
>> SIPROSSII
>> 847 route de Frans (Cr=E9acit=E9)
>> 69400 Villefranche sur Sa=F4ne
>>
>>
>>
>> Le Wed, 3 Sep 2008 20:05:22 +0200
>> "Evert Lammerts" a =E9crit:
>>
>>>On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts
>>> wrote:
>>>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy wrote:
>>>>> When using mysql_query, the SQL string to be executed should not
>>>>> end in a semicolon.
>>>>
>>>> Ending a query with a semicolon should not be a problem - the
>>>> string is parsed by the mysql server, which handles it fine.
>>>
>>>The manual does mention it, I'm a little too quick with my replies. I
>>>personally never had a problem with it though. Plus, it seemed to
>>>work some mails ago.
>>>
>>>David, did I understand well that your problem is solved?
>>>
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 20:50:38 von David DURIEUX

Bonjour,

PHP 5.2.6 on FreeBSD 7.0 i386 associate with apache 2.0.63



Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 13:47:02 -0500
"Dee Ayy" a =E9crit:

>> On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX
>> wrote:
>>> Bonjour,
>>>
>>> I have always the problem, select =3D 0 rows and it delete it like if
>>> delete is before the select :/
>>>
>>> Cordialement,
>>>
>>> David DURIEUX
>
>Your SELECT has a terminating semicolon. Your DELETE does not. Some
>configurations of PHP do not execute from the mysql_query function if
>the query is terminated with a semicolon.
>
>What version of PHP are you using?
>I wish I knew what flags to also ask about that affect the semicolon.
>If in fact your problem is the semicolon.
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 20:51:49 von Evert Lammerts

QnV0IHRoZSBERUxFVEUgaXMgZXhlY3V0ZWQ/IElmIGl0IGlzLCBhbmQgaXQn cyBpbiB0aGUgY29u
ZGl0aW9uLCBsaWtlCmluIHRoZSBhYm92ZSBjb2RlOgoKaWYgKCRyb3cgPSBt eXNxbF9mZXRjaF9h
c3NvYygkcXVlcnkpKSB7CiAgIC4uLi4gREVMRVRFIC4uLgp9Cgpzb21ldGhp bmcgYXBwYXJlbnRs
eSBpcyBmZXRjaGVkLi4uLgoKT24gV2VkLCBTZXAgMywgMjAwOCBhdCA4OjQ5 IFBNLCBEYXZpZCBE
VVJJRVVYIDxkLmR1cmlldXhAc2lwcm9zc2lpLmNvbT4gd3JvdGU6Cj4gQm9u am91ciwKPgo+IFll
cyBJJ20gdXNpbmcgdGhpcyBxdWVyeS4uLi4gYW5kIG5vIHJvdyBzZWxlY3QK Pgo+IENvcmRpYWxl
bWVudCwKPgo+IERhdmlkIERVUklFVVgKPiBUZWwgOiAwNC43NC4wNC44MS4z NAo+IFBvcnQgOiAw
Ni4zNC45OS40NS4xOAo+IE1haWwgOiBkLmR1cmlldXhAc2lwcm9zc2lpLmNv bQo+IFNpdGUgV2Vi
IDogaHR0cDovL3d3dy5zaXByb3NzaWkuY29tLwo+Cj4gU0lQUk9TU0lJCj4g ODQ3IHJvdXRlIGRl
IEZyYW5zIChDcsOpYWNpdMOpKQo+IDY5NDAwIFZpbGxlZnJhbmNoZSBzdXIg U2HDtG5lCj4KPgo+
Cj4gTGUgV2VkLCAzIFNlcCAyMDA4IDIwOjQzOjI1ICswMjAwCj4gIkV2ZXJ0 IExhbW1lcnRzIiA8
ZXZlcnQubGFtbWVydHNAZ21haWwuY29tPiBhIMOpY3JpdDoKPgo+PkFyZSB5 b3Ugc3RpbGwgdXNp
bmcgdGhlIGNvZGUgd2UgdGFsa2VkIGFib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pj4gLS0KPj4+IFBIUCBEYXRhYmFzZSBNYWlsaW5nIExp c3QgKGh0dHA6Ly93
d3cucGhwLm5ldC8pCj4+PiBUbyB1bnN1YnNjcmliZSwgdmlzaXQ6IGh0dHA6 Ly93d3cucGhwLm5l
dC91bnN1Yi5waHAKPj4+Cj4+Pgo+Cj4KPiAtLQo+IFBIUCBEYXRhYmFzZSBN YWlsaW5nIExpc3Qg
KGh0dHA6Ly93d3cucGhwLm5ldC8pCj4gVG8gdW5zdWJzY3JpYmUsIHZpc2l0 OiBodHRwOi8vd3d3
LnBocC5uZXQvdW5zdWIucGhwCj4KPgo=

Re: Probleme with MySQL queries

am 03.09.2008 20:56:45 von David DURIEUX

Bonjour,

Yes DELETE is executed and I have on my page :=20
string(3) "140"
int(0)

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 20:51:49 +0200
"Evert Lammerts" a =E9crit:

>But the DELETE is executed? If it is, and it's in the condition, like
>in the above code:
>
>if ($row =3D mysql_fetch_assoc($query)) {
> .... DELETE ...
>}
>
>something apparently is fetched....
>
>On Wed, Sep 3, 2008 at 8:49 PM, David DURIEUX
> wrote:
>> Bonjour,
>>
>> Yes I'm using this query.... and no row select
>>
>> Cordialement,
>>
>> David DURIEUX
>> Tel : 04.74.04.81.34
>> Port : 06.34.99.45.18
>> Mail : d.durieux@siprossii.com
>> Site Web : http://www.siprossii.com/
>>
>> SIPROSSII
>> 847 route de Frans (Cr=E9acit=E9)
>> 69400 Villefranche sur Sa=F4ne
>>
>>
>>
>> Le Wed, 3 Sep 2008 20:43:25 +0200
>> "Evert Lammerts" a =E9crit:
>>
>>>Are you still using the code we talked about?
>>>
>>>if ($row =3D mysql_fetch_assoc($query)) {
>>> var_dump ($row);
>>> mysql_query("DELETE FROM table WHERE id=3D{$row['id']}") or
>>>die("delete error: " . mysql_error());
>>>}
>>>
>>>if so, apparently it does fetch a row. Otherwise, can you send the
>>>code you're using?
>>>
>>>On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX
>>> wrote:
>>>> Bonjour,
>>>>
>>>> I have always the problem, select =3D 0 rows and it delete it like if
>>>> delete is before the select :/
>>>>
>>>> Cordialement,
>>>>
>>>> David DURIEUX
>>>> Tel : 04.74.04.81.34
>>>> Port : 06.34.99.45.18
>>>> Mail : d.durieux@siprossii.com
>>>> Site Web : http://www.siprossii.com/
>>>>
>>>> SIPROSSII
>>>> 847 route de Frans (Cr=E9acit=E9)
>>>> 69400 Villefranche sur Sa=F4ne
>>>>
>>>>
>>>>
>>>> Le Wed, 3 Sep 2008 20:05:22 +0200
>>>> "Evert Lammerts" a =E9crit:
>>>>
>>>>>On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts
>>>>> wrote:
>>>>>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy
>>>>>> wrote:
>>>>>>> When using mysql_query, the SQL string to be executed should not
>>>>>>> end in a semicolon.
>>>>>>
>>>>>> Ending a query with a semicolon should not be a problem - the
>>>>>> string is parsed by the mysql server, which handles it fine.
>>>>>
>>>>>The manual does mention it, I'm a little too quick with my
>>>>>replies. I personally never had a problem with it though. Plus, it
>>>>>seemed to work some mails ago.
>>>>>
>>>>>David, did I understand well that your problem is solved?
>>>>>
>>>>
>>>>
>>>> --
>>>> PHP Database Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 20:56:55 von Micah Gersten

Can you turn on mysql query logging and see what is actually happening?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



David DURIEUX wrote:
> Bonjour,
>
> Yes I'm using this query.... and no row select
>
> Cordialement,
>
> David DURIEUX
> Tel : 04.74.04.81.34
> Port : 06.34.99.45.18
> Mail : d.durieux@siprossii.com
> Site Web : http://www.siprossii.com/
>
> SIPROSSII
> 847 route de Frans (Créacité)
> 69400 Villefranche sur Saône
>
>
>
> Le Wed, 3 Sep 2008 20:43:25 +0200
> "Evert Lammerts" a écrit:
>
>
>> Are you still using the code we talked about?
>>
>> if ($row = mysql_fetch_assoc($query)) {
>> var_dump ($row);
>> mysql_query("DELETE FROM table WHERE id={$row['id']}") or
>> die("delete error: " . mysql_error());
>> }
>>
>> if so, apparently it does fetch a row. Otherwise, can you send the
>> code you're using?
>>
>> On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX
>> wrote:
>>
>>> Bonjour,
>>>
>>> I have always the problem, select = 0 rows and it delete it like if
>>> delete is before the select :/
>>>
>>> Cordialement,
>>>
>>> David DURIEUX
>>> Tel : 04.74.04.81.34
>>> Port : 06.34.99.45.18
>>> Mail : d.durieux@siprossii.com
>>> Site Web : http://www.siprossii.com/
>>>
>>> SIPROSSII
>>> 847 route de Frans (Créacité)
>>> 69400 Villefranche sur Saône
>>>
>>>
>>>
>>> Le Wed, 3 Sep 2008 20:05:22 +0200
>>> "Evert Lammerts" a écrit:
>>>
>>>
>>>> On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts
>>>> wrote:
>>>>
>>>>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy wrote:
>>>>>
>>>>>> When using mysql_query, the SQL string to be executed should not
>>>>>> end in a semicolon.
>>>>>>
>>>>> Ending a query with a semicolon should not be a problem - the
>>>>> string is parsed by the mysql server, which handles it fine.
>>>>>
>>>> The manual does mention it, I'm a little too quick with my replies. I
>>>> personally never had a problem with it though. Plus, it seemed to
>>>> work some mails ago.
>>>>
>>>> David, did I understand well that your problem is solved?
>>>>
>>>>
>>> --
>>> PHP Database Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>>
>
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 21:01:14 von Evert Lammerts

VGhpcyBpcyB3ZWlyZC4gQ2FuIHlvdSBzZW5kIG92ZXIgdGhlIGNvbXBsZXRl IGZpbGU/CgpPbiBX
ZWQsIFNlcCAzLCAyMDA4IGF0IDg6NTYgUE0sIERhdmlkIERVUklFVVggPGQu ZHVyaWV1eEBzaXBy
b3NzaWkuY29tPiB3cm90ZToKPiBCb25qb3VyLAo+Cj4gWWVzIERFTEVURSBp cyBleGVjdXRlZCBh
bmQgSSBoYXZlIG9uIG15IHBhZ2UgOgo+IHN0cmluZygzKSAiMTQwIgo+IGlu dCgwKQo+Cj4gQ29y
ZGlhbGVtZW50LAo+Cj4gRGF2aWQgRFVSSUVVWAo+IFRlbCA6IDA0Ljc0LjA0 LjgxLjM0Cj4gUG9y
dCA6IDA2LjM0Ljk5LjQ1LjE4Cj4gTWFpbCA6IGQuZHVyaWV1eEBzaXByb3Nz aWkuY29tCj4gU2l0
ZSBXZWIgOiBodHRwOi8vd3d3LnNpcHJvc3NpaS5jb20vCj4KPiBTSVBST1NT SUkKPiA4NDcgcm91
dGUgZGUgRnJhbnMgKENyw6lhY2l0w6kpCj4gNjk0MDAgVmlsbGVmcmFuY2hl IHN1ciBTYcO0bmUK
Pgo+Cj4KPiBMZSBXZWQsIDMgU2VwIDIwMDggMjA6NTE6NDkgKzAyMDAKPiAi RXZlcnQgTGFtbWVy
dHMiIDxldmVydC5sYW1tZXJ0c0BnbWFpbC5jb20+IGEgw6ljcml0Ogo+Cj4+ QnV0IHRoZSBERUxF
VEUgaXMgZXhlY3V0ZWQ/IElmIGl0IGlzLCBhbmQgaXQncyBpbiB0aGUgY29u ZGl0aW9uLCBsaWtl
Cj4+aW4gdGhlIGFib3ZlIGNvZGU6Cj4+Cj4+aWYgKCRyb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aGF0IHlvdXIgcHJvYmxlbSBpcyBzb2x2ZWQ/Cj4+Pj4+ Pgo+Pj4+Pgo+Pj4+
Pgo+Pj4+PiAtLQo+Pj4+PiBQSFAgRGF0YWJhc2UgTWFpbGluZyBMaXN0ICho dHRwOi8vd3d3LnBo
cC5uZXQvKQo+Pj4+PiBUbyB1bnN1YnNjcmliZSwgdmlzaXQ6IGh0dHA6Ly93 d3cucGhwLm5ldC91
bnN1Yi5waHAKPj4+Pj4KPj4+Pj4KPj4+Cj4+Pgo+Pj4gLS0KPj4+IFBIUCBE YXRhYmFzZSBNYWls
aW5nIExpc3QgKGh0dHA6Ly93d3cucGhwLm5ldC8pCj4+PiBUbyB1bnN1YnNj cmliZSwgdmlzaXQ6
IGh0dHA6Ly93d3cucGhwLm5ldC91bnN1Yi5waHAKPj4+Cj4+Pgo+Cj4K

Re: Probleme with MySQL queries

am 03.09.2008 21:08:25 von David DURIEUX

Bonjour,

It was difficult, I have many files in includes, I will try to execute
this code before in the php execution to see what code give problem.

I try this now and I tell you the results of investigations


Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 21:01:14 +0200
"Evert Lammerts" a =E9crit:

>This is weird. Can you send over the complete file?
>
>On Wed, Sep 3, 2008 at 8:56 PM, David DURIEUX
> wrote:
>> Bonjour,
>>
>> Yes DELETE is executed and I have on my page :
>> string(3) "140"
>> int(0)
>>
>> Cordialement,
>>
>> David DURIEUX
>> Tel : 04.74.04.81.34
>> Port : 06.34.99.45.18
>> Mail : d.durieux@siprossii.com
>> Site Web : http://www.siprossii.com/
>>
>> SIPROSSII
>> 847 route de Frans (Cr=E9acit=E9)
>> 69400 Villefranche sur Sa=F4ne
>>
>>
>>
>> Le Wed, 3 Sep 2008 20:51:49 +0200
>> "Evert Lammerts" a =E9crit:
>>
>>>But the DELETE is executed? If it is, and it's in the condition, like
>>>in the above code:
>>>
>>>if ($row =3D mysql_fetch_assoc($query)) {
>>> .... DELETE ...
>>>}
>>>
>>>something apparently is fetched....
>>>
>>>On Wed, Sep 3, 2008 at 8:49 PM, David DURIEUX
>>> wrote:
>>>> Bonjour,
>>>>
>>>> Yes I'm using this query.... and no row select
>>>>
>>>> Cordialement,
>>>>
>>>> David DURIEUX
>>>> Tel : 04.74.04.81.34
>>>> Port : 06.34.99.45.18
>>>> Mail : d.durieux@siprossii.com
>>>> Site Web : http://www.siprossii.com/
>>>>
>>>> SIPROSSII
>>>> 847 route de Frans (Cr=E9acit=E9)
>>>> 69400 Villefranche sur Sa=F4ne
>>>>
>>>>
>>>>
>>>> Le Wed, 3 Sep 2008 20:43:25 +0200
>>>> "Evert Lammerts" a =E9crit:
>>>>
>>>>>Are you still using the code we talked about?
>>>>>
>>>>>if ($row =3D mysql_fetch_assoc($query)) {
>>>>> var_dump ($row);
>>>>> mysql_query("DELETE FROM table WHERE id=3D{$row['id']}")
>>>>> or
>>>>>die("delete error: " . mysql_error());
>>>>>}
>>>>>
>>>>>if so, apparently it does fetch a row. Otherwise, can you send the
>>>>>code you're using?
>>>>>
>>>>>On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX
>>>>> wrote:
>>>>>> Bonjour,
>>>>>>
>>>>>> I have always the problem, select =3D 0 rows and it delete it like
>>>>>> if delete is before the select :/
>>>>>>
>>>>>> Cordialement,
>>>>>>
>>>>>> David DURIEUX
>>>>>> Tel : 04.74.04.81.34
>>>>>> Port : 06.34.99.45.18
>>>>>> Mail : d.durieux@siprossii.com
>>>>>> Site Web : http://www.siprossii.com/
>>>>>>
>>>>>> SIPROSSII
>>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>>
>>>>>>
>>>>>>
>>>>>> Le Wed, 3 Sep 2008 20:05:22 +0200
>>>>>> "Evert Lammerts" a =E9crit:
>>>>>>
>>>>>>>On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts
>>>>>>> wrote:
>>>>>>>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy
>>>>>>>> wrote:
>>>>>>>>> When using mysql_query, the SQL string to be executed should
>>>>>>>>> not end in a semicolon.
>>>>>>>>
>>>>>>>> Ending a query with a semicolon should not be a problem - the
>>>>>>>> string is parsed by the mysql server, which handles it fine.
>>>>>>>
>>>>>>>The manual does mention it, I'm a little too quick with my
>>>>>>>replies. I personally never had a problem with it though. Plus,
>>>>>>>it seemed to work some mails ago.
>>>>>>>
>>>>>>>David, did I understand well that your problem is solved?
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> PHP Database Mailing List (http://www.php.net/)
>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> PHP Database Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>>
>>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 21:27:28 von Evert Lammerts

> Your SELECT has a terminating semicolon.

I'm guessing Multiple statement execution is enabled by default...
http://dev.mysql.com/doc/refman/5.0/en/mysql-query.html

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 21:50:42 von David DURIEUX

Bonjour,

Humm if I go on page index.php?deleteid=3D139=20
it works

If I click on the link type=3D"submit" value=3D"Supprimer" style=3D"width: 100px; " />
I have the SELECT problem

I will be crazy=20

Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 21:08:25 +0200
David DURIEUX a =E9crit:

>Bonjour,
>
>It was difficult, I have many files in includes, I will try to execute
>this code before in the php execution to see what code give problem.
>
>I try this now and I tell you the results of investigations
>
>
>Cordialement,
>
>David DURIEUX
>Tel : 04.74.04.81.34
>Port : 06.34.99.45.18
>Mail : d.durieux@siprossii.com
>Site Web : http://www.siprossii.com/
>
>SIPROSSII
>847 route de Frans (Cr=E9acit=E9)
>69400 Villefranche sur Sa=F4ne
>
>
>
>Le Wed, 3 Sep 2008 21:01:14 +0200
>"Evert Lammerts" a =E9crit:
>
>>This is weird. Can you send over the complete file?
>>
>>On Wed, Sep 3, 2008 at 8:56 PM, David DURIEUX
>> wrote:
>>> Bonjour,
>>>
>>> Yes DELETE is executed and I have on my page :
>>> string(3) "140"
>>> int(0)
>>>
>>> Cordialement,
>>>
>>> David DURIEUX
>>> Tel : 04.74.04.81.34
>>> Port : 06.34.99.45.18
>>> Mail : d.durieux@siprossii.com
>>> Site Web : http://www.siprossii.com/
>>>
>>> SIPROSSII
>>> 847 route de Frans (Cr=E9acit=E9)
>>> 69400 Villefranche sur Sa=F4ne
>>>
>>>
>>>
>>> Le Wed, 3 Sep 2008 20:51:49 +0200
>>> "Evert Lammerts" a =E9crit:
>>>
>>>>But the DELETE is executed? If it is, and it's in the condition,
>>>>like in the above code:
>>>>
>>>>if ($row =3D mysql_fetch_assoc($query)) {
>>>> .... DELETE ...
>>>>}
>>>>
>>>>something apparently is fetched....
>>>>
>>>>On Wed, Sep 3, 2008 at 8:49 PM, David DURIEUX
>>>> wrote:
>>>>> Bonjour,
>>>>>
>>>>> Yes I'm using this query.... and no row select
>>>>>
>>>>> Cordialement,
>>>>>
>>>>> David DURIEUX
>>>>> Tel : 04.74.04.81.34
>>>>> Port : 06.34.99.45.18
>>>>> Mail : d.durieux@siprossii.com
>>>>> Site Web : http://www.siprossii.com/
>>>>>
>>>>> SIPROSSII
>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>
>>>>>
>>>>>
>>>>> Le Wed, 3 Sep 2008 20:43:25 +0200
>>>>> "Evert Lammerts" a =E9crit:
>>>>>
>>>>>>Are you still using the code we talked about?
>>>>>>
>>>>>>if ($row =3D mysql_fetch_assoc($query)) {
>>>>>> var_dump ($row);
>>>>>> mysql_query("DELETE FROM table WHERE id=3D{$row['id']}")
>>>>>> or
>>>>>>die("delete error: " . mysql_error());
>>>>>>}
>>>>>>
>>>>>>if so, apparently it does fetch a row. Otherwise, can you send the
>>>>>>code you're using?
>>>>>>
>>>>>>On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX
>>>>>> wrote:
>>>>>>> Bonjour,
>>>>>>>
>>>>>>> I have always the problem, select =3D 0 rows and it delete it like
>>>>>>> if delete is before the select :/
>>>>>>>
>>>>>>> Cordialement,
>>>>>>>
>>>>>>> David DURIEUX
>>>>>>> Tel : 04.74.04.81.34
>>>>>>> Port : 06.34.99.45.18
>>>>>>> Mail : d.durieux@siprossii.com
>>>>>>> Site Web : http://www.siprossii.com/
>>>>>>>
>>>>>>> SIPROSSII
>>>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Le Wed, 3 Sep 2008 20:05:22 +0200
>>>>>>> "Evert Lammerts" a =E9crit:
>>>>>>>
>>>>>>>>On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts
>>>>>>>> wrote:
>>>>>>>>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy
>>>>>>>>> wrote:
>>>>>>>>>> When using mysql_query, the SQL string to be executed should
>>>>>>>>>> not end in a semicolon.
>>>>>>>>>
>>>>>>>>> Ending a query with a semicolon should not be a problem - the
>>>>>>>>> string is parsed by the mysql server, which handles it fine.
>>>>>>>>
>>>>>>>>The manual does mention it, I'm a little too quick with my
>>>>>>>>replies. I personally never had a problem with it though. Plus,
>>>>>>>>it seemed to work some mails ago.
>>>>>>>>
>>>>>>>>David, did I understand well that your problem is solved?
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> PHP Database Mailing List (http://www.php.net/)
>>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> PHP Database Mailing List (http://www.php.net/)
>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>
>>>>>
>>>
>>>
>
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 21:53:35 von David DURIEUX

Bonjour,

The problem come from the in the input submit

With It works

It is very Space



Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 21:50:42 +0200
David DURIEUX a =E9crit:

>Bonjour,
>
>Humm if I go on page index.php?deleteid=3D139=20
>it works
>
>If I click on the link
>type=3D"submit" value=3D"Supprimer" style=3D"width: 100px; " />
>I have the SELECT problem
>
>I will be crazy=20
>
>Cordialement,
>
>David DURIEUX
>Tel : 04.74.04.81.34
>Port : 06.34.99.45.18
>Mail : d.durieux@siprossii.com
>Site Web : http://www.siprossii.com/
>
>SIPROSSII
>847 route de Frans (Cr=E9acit=E9)
>69400 Villefranche sur Sa=F4ne
>
>
>
>Le Wed, 3 Sep 2008 21:08:25 +0200
>David DURIEUX a =E9crit:
>
>>Bonjour,
>>
>>It was difficult, I have many files in includes, I will try to execute
>>this code before in the php execution to see what code give problem.
>>
>>I try this now and I tell you the results of investigations
>>
>>
>>Cordialement,
>>
>>David DURIEUX
>>Tel : 04.74.04.81.34
>>Port : 06.34.99.45.18
>>Mail : d.durieux@siprossii.com
>>Site Web : http://www.siprossii.com/
>>
>>SIPROSSII
>>847 route de Frans (Cr=E9acit=E9)
>>69400 Villefranche sur Sa=F4ne
>>
>>
>>
>>Le Wed, 3 Sep 2008 21:01:14 +0200
>>"Evert Lammerts" a =E9crit:
>>
>>>This is weird. Can you send over the complete file?
>>>
>>>On Wed, Sep 3, 2008 at 8:56 PM, David DURIEUX
>>> wrote:
>>>> Bonjour,
>>>>
>>>> Yes DELETE is executed and I have on my page :
>>>> string(3) "140"
>>>> int(0)
>>>>
>>>> Cordialement,
>>>>
>>>> David DURIEUX
>>>> Tel : 04.74.04.81.34
>>>> Port : 06.34.99.45.18
>>>> Mail : d.durieux@siprossii.com
>>>> Site Web : http://www.siprossii.com/
>>>>
>>>> SIPROSSII
>>>> 847 route de Frans (Cr=E9acit=E9)
>>>> 69400 Villefranche sur Sa=F4ne
>>>>
>>>>
>>>>
>>>> Le Wed, 3 Sep 2008 20:51:49 +0200
>>>> "Evert Lammerts" a =E9crit:
>>>>
>>>>>But the DELETE is executed? If it is, and it's in the condition,
>>>>>like in the above code:
>>>>>
>>>>>if ($row =3D mysql_fetch_assoc($query)) {
>>>>> .... DELETE ...
>>>>>}
>>>>>
>>>>>something apparently is fetched....
>>>>>
>>>>>On Wed, Sep 3, 2008 at 8:49 PM, David DURIEUX
>>>>> wrote:
>>>>>> Bonjour,
>>>>>>
>>>>>> Yes I'm using this query.... and no row select
>>>>>>
>>>>>> Cordialement,
>>>>>>
>>>>>> David DURIEUX
>>>>>> Tel : 04.74.04.81.34
>>>>>> Port : 06.34.99.45.18
>>>>>> Mail : d.durieux@siprossii.com
>>>>>> Site Web : http://www.siprossii.com/
>>>>>>
>>>>>> SIPROSSII
>>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>>
>>>>>>
>>>>>>
>>>>>> Le Wed, 3 Sep 2008 20:43:25 +0200
>>>>>> "Evert Lammerts" a =E9crit:
>>>>>>
>>>>>>>Are you still using the code we talked about?
>>>>>>>
>>>>>>>if ($row =3D mysql_fetch_assoc($query)) {
>>>>>>> var_dump ($row);
>>>>>>> mysql_query("DELETE FROM table WHERE id=3D{$row['id']}")
>>>>>>> or
>>>>>>>die("delete error: " . mysql_error());
>>>>>>>}
>>>>>>>
>>>>>>>if so, apparently it does fetch a row. Otherwise, can you send
>>>>>>>the code you're using?
>>>>>>>
>>>>>>>On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX
>>>>>>> wrote:
>>>>>>>> Bonjour,
>>>>>>>>
>>>>>>>> I have always the problem, select =3D 0 rows and it delete it
>>>>>>>> like if delete is before the select :/
>>>>>>>>
>>>>>>>> Cordialement,
>>>>>>>>
>>>>>>>> David DURIEUX
>>>>>>>> Tel : 04.74.04.81.34
>>>>>>>> Port : 06.34.99.45.18
>>>>>>>> Mail : d.durieux@siprossii.com
>>>>>>>> Site Web : http://www.siprossii.com/
>>>>>>>>
>>>>>>>> SIPROSSII
>>>>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Le Wed, 3 Sep 2008 20:05:22 +0200
>>>>>>>> "Evert Lammerts" a =E9crit:
>>>>>>>>
>>>>>>>>>On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts
>>>>>>>>> wrote:
>>>>>>>>>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy
>>>>>>>>>> wrote:
>>>>>>>>>>> When using mysql_query, the SQL string to be executed should
>>>>>>>>>>> not end in a semicolon.
>>>>>>>>>>
>>>>>>>>>> Ending a query with a semicolon should not be a problem - the
>>>>>>>>>> string is parsed by the mysql server, which handles it fine.
>>>>>>>>>
>>>>>>>>>The manual does mention it, I'm a little too quick with my
>>>>>>>>>replies. I personally never had a problem with it though. Plus,
>>>>>>>>>it seemed to work some mails ago.
>>>>>>>>>
>>>>>>>>>David, did I understand well that your problem is solved?
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> PHP Database Mailing List (http://www.php.net/)
>>>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> PHP Database Mailing List (http://www.php.net/)
>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
>
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Probleme with MySQL queries

am 03.09.2008 21:56:56 von Evert Lammerts

YW4gYW5jaG9yIGFyb3VuZCBhIHN1Ym1pdCBidXR0b24uLi4uLi4uLi4uLj8/ IEknbSBhbWF6ZWQg
dGhhdCB3b3JrcyEhIDotKQoKQSByZWFsIGxpbmsgZG9lc24ndCBtYWtlIGEg ZGlmZmVyZW5jZT8K
CjxhIGhyZWY9ImluZGV4LnBocD9kZWxldGVpZD0xMzkiPkRFTEVURTwvYT4K CltNYWtlIHN1cmUg
dG8gcmVwbGFjZSAxMzkgd2l0aCBhbiBleGlzdGluZyBpZC4uLl0KCk9uIFdl ZCwgU2VwIDMsIDIw
MDggYXQgOTo1MCBQTSwgRGF2aWQgRFVSSUVVWCA8ZC5kdXJpZXV4QHNpcHJv c3NpaS5jb20+IHdy
b3RlOgo+IEJvbmpvdXIsCj4KPiBIdW1tIGlmIEkgZ28gb24gcGFnZSBpbmRl eC5waHA/ZGVsZXRl
aWQ9MTM5Cj4gaXQgd29ya3MKPgo+IElmIEkgY2xpY2sgb24gdGhlIGxpbmsg PGEgaHJlZj0iaW5k
ZXgucGhwP2RlbGV0ZWlkPTEzOSI+PGlucHV0Cj4gdHlwZT0ic3VibWl0IiB2 YWx1ZT0iU3VwcHJp
bWVyIiBzdHlsZT0id2lkdGg6IDEwMHB4OyAiIC8+PC9hPgo+IEkgaGF2ZSB0 aGUgU0VMRUNUIHBy
b2JsZW0KPgo+IEkgd2lsbCBiZSBjcmF6eQo+Cj4gQ29yZGlhbGVtZW50LAo+ Cj4gRGF2aWQgRFVS
SUVVWAo+IFRlbCA6IDA0Ljc0LjA0L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6Ly93d3cu
cGhwLm5ldC91bnN1Yi5waHAKPj4+Pj4+Cj4+Pj4+Pgo+Pj4+Cj4+Pj4KPj4K Pj4KPgo+Cj4gLS0K
PiBQSFAgRGF0YWJhc2UgTWFpbGluZyBMaXN0IChodHRwOi8vd3d3LnBocC5u ZXQvKQo+IFRvIHVu
c3Vic2NyaWJlLCB2aXNpdDogaHR0cDovL3d3dy5waHAubmV0L3Vuc3ViLnBo cAo+Cj4K

Re: Probleme with MySQL queries

am 03.09.2008 21:59:36 von David DURIEUX

Bonjour,


I have make this to have a button, it's an error, it's the first time I
have a problem with this.

I'm sorry to have get your time.


Cordialement,

David DURIEUX
Tel : 04.74.04.81.34
Port : 06.34.99.45.18
Mail : d.durieux@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
847 route de Frans (Cr=E9acit=E9)
69400 Villefranche sur Sa=F4ne



Le Wed, 3 Sep 2008 21:56:56 +0200
"Evert Lammerts" a =E9crit:

>an anchor around a submit button...........?? I'm amazed that
>works!! :-)
>
>A real link doesn't make a difference?
>
>
>
>[Make sure to replace 139 with an existing id...]
>
>On Wed, Sep 3, 2008 at 9:50 PM, David DURIEUX
> wrote:
>> Bonjour,
>>
>> Humm if I go on page index.php?deleteid=3D139
>> it works
>>
>> If I click on the link >> type=3D"submit" value=3D"Supprimer" style=3D"width: 100px; " />
>> I have the SELECT problem
>>
>> I will be crazy
>>
>> Cordialement,
>>
>> David DURIEUX
>> Tel : 04.74.04.81.34
>> Port : 06.34.99.45.18
>> Mail : d.durieux@siprossii.com
>> Site Web : http://www.siprossii.com/
>>
>> SIPROSSII
>> 847 route de Frans (Cr=E9acit=E9)
>> 69400 Villefranche sur Sa=F4ne
>>
>>
>>
>> Le Wed, 3 Sep 2008 21:08:25 +0200
>> David DURIEUX a =E9crit:
>>
>>>Bonjour,
>>>
>>>It was difficult, I have many files in includes, I will try to
>>>execute this code before in the php execution to see what code give
>>>problem.
>>>
>>>I try this now and I tell you the results of investigations
>>>
>>>
>>>Cordialement,
>>>
>>>David DURIEUX
>>>Tel : 04.74.04.81.34
>>>Port : 06.34.99.45.18
>>>Mail : d.durieux@siprossii.com
>>>Site Web : http://www.siprossii.com/
>>>
>>>SIPROSSII
>>>847 route de Frans (Cr=E9acit=E9)
>>>69400 Villefranche sur Sa=F4ne
>>>
>>>
>>>
>>>Le Wed, 3 Sep 2008 21:01:14 +0200
>>>"Evert Lammerts" a =E9crit:
>>>
>>>>This is weird. Can you send over the complete file?
>>>>
>>>>On Wed, Sep 3, 2008 at 8:56 PM, David DURIEUX
>>>> wrote:
>>>>> Bonjour,
>>>>>
>>>>> Yes DELETE is executed and I have on my page :
>>>>> string(3) "140"
>>>>> int(0)
>>>>>
>>>>> Cordialement,
>>>>>
>>>>> David DURIEUX
>>>>> Tel : 04.74.04.81.34
>>>>> Port : 06.34.99.45.18
>>>>> Mail : d.durieux@siprossii.com
>>>>> Site Web : http://www.siprossii.com/
>>>>>
>>>>> SIPROSSII
>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>
>>>>>
>>>>>
>>>>> Le Wed, 3 Sep 2008 20:51:49 +0200
>>>>> "Evert Lammerts" a =E9crit:
>>>>>
>>>>>>But the DELETE is executed? If it is, and it's in the condition,
>>>>>>like in the above code:
>>>>>>
>>>>>>if ($row =3D mysql_fetch_assoc($query)) {
>>>>>> .... DELETE ...
>>>>>>}
>>>>>>
>>>>>>something apparently is fetched....
>>>>>>
>>>>>>On Wed, Sep 3, 2008 at 8:49 PM, David DURIEUX
>>>>>> wrote:
>>>>>>> Bonjour,
>>>>>>>
>>>>>>> Yes I'm using this query.... and no row select
>>>>>>>
>>>>>>> Cordialement,
>>>>>>>
>>>>>>> David DURIEUX
>>>>>>> Tel : 04.74.04.81.34
>>>>>>> Port : 06.34.99.45.18
>>>>>>> Mail : d.durieux@siprossii.com
>>>>>>> Site Web : http://www.siprossii.com/
>>>>>>>
>>>>>>> SIPROSSII
>>>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Le Wed, 3 Sep 2008 20:43:25 +0200
>>>>>>> "Evert Lammerts" a =E9crit:
>>>>>>>
>>>>>>>>Are you still using the code we talked about?
>>>>>>>>
>>>>>>>>if ($row =3D mysql_fetch_assoc($query)) {
>>>>>>>> var_dump ($row);
>>>>>>>> mysql_query("DELETE FROM table WHERE
>>>>>>>> id=3D{$row['id']}") or
>>>>>>>>die("delete error: " . mysql_error());
>>>>>>>>}
>>>>>>>>
>>>>>>>>if so, apparently it does fetch a row. Otherwise, can you send
>>>>>>>>the code you're using?
>>>>>>>>
>>>>>>>>On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX
>>>>>>>> wrote:
>>>>>>>>> Bonjour,
>>>>>>>>>
>>>>>>>>> I have always the problem, select =3D 0 rows and it delete it
>>>>>>>>> like if delete is before the select :/
>>>>>>>>>
>>>>>>>>> Cordialement,
>>>>>>>>>
>>>>>>>>> David DURIEUX
>>>>>>>>> Tel : 04.74.04.81.34
>>>>>>>>> Port : 06.34.99.45.18
>>>>>>>>> Mail : d.durieux@siprossii.com
>>>>>>>>> Site Web : http://www.siprossii.com/
>>>>>>>>>
>>>>>>>>> SIPROSSII
>>>>>>>>> 847 route de Frans (Cr=E9acit=E9)
>>>>>>>>> 69400 Villefranche sur Sa=F4ne
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Le Wed, 3 Sep 2008 20:05:22 +0200
>>>>>>>>> "Evert Lammerts" a =E9crit:
>>>>>>>>>
>>>>>>>>>>On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts
>>>>>>>>>> wrote:
>>>>>>>>>>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy
>>>>>>>>>>> wrote:
>>>>>>>>>>>> When using mysql_query, the SQL string to be executed
>>>>>>>>>>>> should not end in a semicolon.
>>>>>>>>>>>
>>>>>>>>>>> Ending a query with a semicolon should not be a problem -
>>>>>>>>>>> the string is parsed by the mysql server, which handles it
>>>>>>>>>>> fine.
>>>>>>>>>>
>>>>>>>>>>The manual does mention it, I'm a little too quick with my
>>>>>>>>>>replies. I personally never had a problem with it though.
>>>>>>>>>>Plus, it seemed to work some mails ago.
>>>>>>>>>>
>>>>>>>>>>David, did I understand well that your problem is solved?
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> PHP Database Mailing List (http://www.php.net/)
>>>>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> PHP Database Mailing List (http://www.php.net/)
>>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php